package com.william.yun.yunliwuli.api.rest;

import com.alibaba.fastjson.JSONObject;
import com.william.yun.yunliwuli.api.request.template.TemplateRequest;
import com.william.yun.yunliwuli.api.response.template.TemplateResponse;
import com.william.yun.yunliwuli.service.impl.TemplateServiceImpl;

/**
 * 模版
 */
public class TemplateApi extends BaseApi {

    public TemplateResponse template(TemplateRequest request, String token){
        JSONObject templateService = new TemplateServiceImpl().getTemplateService(getJsonParam(request), token);
        return JSONObject.toJavaObject(templateService, TemplateResponse.class);
    }
}
